<template>
  <div>
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>
export default {
  mounted() {
    document.title = this.$route.meta.title;
  },
  watch: {
    $route(newValue, oldValue) {
      // console.log("新的路由值：", newValue);
      document.title = this.$route.meta.title;
    },
  },
};
</script>

<style lang="scss" scoped>

</style>
